<template>
    <div>
        <div>
            <input type="text" placeholder="user" v-model="user">
        </div>
        <div>
            <input type="password" placeholder="password" v-model="password">
        </div>
        <div>
            <input type="email" placeholder="email" v-model="email">
        </div>
        <div>
            <button @click="registor">注册</button>
        </div>
    </div>
</template>


<style>

</style>


<script>
export default {
    data() {
        return {
            user: '',
            password: '',
            repassword: '',
            email: ''
        }
    },
    methods: {
        registor() {
            let params = {
                user: this.user,
                password: this.password,
                repassword: this.repassword,
                email: this.email
            }
            console.log(this)
            this.$http.post('/user/registor', params).then(function(rep){
                console.log(rep)
            }).catch(function(err){
                console.log(err);
            })
        }
    }

}
</script>
